<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<script>
		
		window.onload = function () {
			box = document.getElementById('box');
			span = document.getElementById('span');

			a = document.createElement('a');
			a.href= "http://www.baidu.com";
			a.innerHTML='百度一下';

			for (var i = 0; i < 10; i++) {
				newA = a.cloneNode(true);
				box.appendChild(newA);
			}

			

			// box.insertBefore(a,span);
			// box.removeChild(span);
			// box.replaceChild(a,span)
		}


	</script>
</head>
<body>
	<p id="box">

		<span id="span">我是span</span>

	</p>
</body>
</html>